/*
 *  Scalar.h
 *  T3nsors
 *
 *  Created by Michael Barriault on 10-09-23.
 *  Copyright 2010 MikBarr Studios. All rights reserved.
 *
 */

#pragma once

#include <T3nsors/Domain.h>
#include <string>
#include <cmath>

namespace T3 {
	class Scalar {
	private:
		std::vector<double> T;
	public:
		std::string id;
		T3::Domain O;
		Scalar(void);
		Scalar(std::string iid="");
		Scalar(Domain,std::string iid="");
		double& operator[](int);
		double& operator()(int,...);
		Scalar& operator=(double);
		Scalar& operator+=(Scalar&);
		operator double();
	};
}

T3::Scalar operator-(T3::Scalar);
T3::Scalar operator+(T3::Scalar, T3::Scalar);
T3::Scalar operator-(T3::Scalar, T3::Scalar);
T3::Scalar operator*(T3::Scalar, T3::Scalar);
T3::Scalar operator/(T3::Scalar, T3::Scalar);
T3::Scalar operator^(T3::Scalar, T3::Scalar);
T3::Scalar operator+(T3::Scalar, double);
T3::Scalar operator-(T3::Scalar, double);
T3::Scalar operator*(T3::Scalar, double);
T3::Scalar operator/(T3::Scalar, double);
T3::Scalar operator^(T3::Scalar, double);
T3::Scalar operator+(double, T3::Scalar);
T3::Scalar operator-(double, T3::Scalar);
T3::Scalar operator*(double, T3::Scalar);
T3::Scalar operator/(double, T3::Scalar);
T3::Scalar operator^(double, T3::Scalar);
T3::Scalar sin(T3::Scalar);
T3::Scalar cos(T3::Scalar);
T3::Scalar sin2(T3::Scalar);
T3::Scalar sqrt(T3::Scalar);
T3::Scalar log(T3::Scalar, double b=M_E);
double l2(T3::Scalar,double p=2.);
T3::Scalar LinCom(double,T3::Scalar,double,T3::Scalar,std::string id="");
T3::Scalar LinCom(double,T3::Scalar,double,T3::Scalar,double,T3::Scalar,std::string id="");
T3::Scalar LinCom(double,T3::Scalar,double,T3::Scalar,double,T3::Scalar,double,T3::Scalar,std::string id="");

